xen init script: rewrite xenstored start logic
authorHans van Kranenburg <hans@knorrie.org>
Sat, 9 Feb 2019 23:37:55 +0000 (00:37 +0100)
committerIan Jackson <ian.jackson@citrix.com>
Fri, 22 Feb 2019 14:00:16 +0000 (14:00 +0000)
commitd2c9367227db95bc2dbe4fde71dc1a2cbb1c37d5
treeca0143bca2861f64b73c188a6ebdb9e999fbbea5
parent2f34db35dd27abb4280d38ebc4464c21f64df8c9
xen init script: rewrite xenstored start logic

We're adding oxenstored, and we want use it by default in Xen 4.11.

When doing a Debian upgrade from Stretch to Buster, the xen-utils-common
package will be upgraded to the new version, but it still needs to
support running the Xen 4.8 hypervisor and utils, because the user might
not have rebooted yet, or might boot into the 4.8 hypervisor again
because there were troubles running 4.11.

So, this means that oxenstored might or might not be available, and we
have to deal with that.

See comments in the code for more explanation about the new program
flow.

Also...
* Allow the user to explicitly configure a xenstored binary in
/etc/default/xen.
* Use if statements rather than constructs using || and && to make the
program flow a bit easier to understand.
* Remove the confuscating madness of having 1 as a success return code.
* Don't print the xenstored progress message if we're not touching it.

Signed-off-by: Hans van Kranenburg <hans@knorrie.org>
Acked-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
debian/xen-utils-common.xen.init